﻿//-----------------------------------------------------------------------
// <copyright file="FieldDefinitionRegistration.cs" company="Jamie Knight">
// Copyright (c) Jamie Knight. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;
using System.Windows.Media;
using DevKnightlie.WPF.AutoForm.WPFToolkit.FieldDefinitions;

namespace DevKnightlie.WPF.AutoForm.WPFToolkit
{
    
    /// <summary>
    /// Simple static class to register the WPFToolkit field definitions with the FieldDefinitionRegistry
    /// </summary>
    public static class FieldDefinitionRegistration
    {
        /// <summary>
        /// Register WPFToolkit field definitions, such as UpDown controls for numeric primitives
        /// </summary>
        public static void RegisterWPFToolkitDefinitions()
        {
            FieldDefinitionRegistry.Default.RegisterDefinition<DateTime, DateTimePickerFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<Color, ColorPickerFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<String, AutoSelectTextBoxFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<int, IntegerUpDownFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<byte, ByteUpDownFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<short, ShortUpDownFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<long, LongUpDownFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<decimal, DecimalUpDownFieldDefinition>();
            FieldDefinitionRegistry.Default.RegisterDefinition<Single, SingleUpDownFieldDefinition>();

        }
    }
}
